const Controller = require('egg').Controller;


class TokenController extends Controller {
  // 登录
  async index() {
    const {
      ctx,
      app
    } = this;
    /* 设置签名 */
    
    const token = app.jwt.sign(app.config.jwt.secret);
    ctx.body = {
      apikey: token
    }
  }
}

module.exports = TokenController;